package jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class Test2 {
    public static void main(String[] args) {
        try (Connection connection = DBUtil.getConnection();)
        {

            Statement statement = connection.createStatement();

            String sql = "CREATE TABLE article("+
                         "id INT PRIMARY KEY AUTO_INCREMENT, "+
                         "title VARCHAR(200), "+
                         "content VARCHAR(1000)"+
                         ")";
            statement.execute(sql);
            System.out.println("创建成功");

        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
    }
}
